const Router = require('koa-router');
const router = new Router();
const {db, QueryTypes} = require("../../models/db");

router.post('/zq/getInfo', async ctx => {
    try {
        let tenantId = ctx.user.tenantId;
        let zq = await db.query(`select top 1 * from zq where tenantId=${tenantId} order by  id  `,{type: QueryTypes.SELECT,plain: true})
        return ctx.suc('', zq);
    } catch (e) {
        return ctx.err('无返回数据')
    }
})

module.exports = router;
